(define (double-tree bintree)
    (if (integer? bintree)
        (* bintree 2)
        (append
            (list (car bintree))
            (list (double-tree (cadr bintree)))
            (list (double-tree (caddr bintree)))
        )
    )
)

(display
    (double-tree
        `(baz
            (bar 1 (foo 1 2))
            (biz 4 5)
        ) 
    )
)
